//
//  LBReportController.swift
//  ANOA
//
//  Created by zwb on 2016/11/18.
//  Copyright © 2025 aowang. All rights reserved.
//

import Foundation

enum ReportPath {
    case education // 学历排行
    case age // 年龄排行
    case groupProfits(month: String) // 集团利润
    case dynamicInsuranceSales(orgCode: String, month: String) // 动保销售
    case batchSales(orgCode: String, code: String, month: String, staff: String) // 配合料体系销售
    case premixSales(orgCode: String, code: String, month: String, staff: String) // 预混料体系销售
    case concentratedMilk(orgCode: String, code: String, month: String, staff: String) // 浓乳料销售
    case overdue(orgCode: String, code: String, month: String, staff: String) // 超期欠款

    var path: String {
        switch self {
        case .education:
            return "oa/rl/rlv_staff_sh_new.cpt"
        case .age:
            return "oa/rl/rlv_staff_nl_new.cpt"
        case .groupProfits:
            return "oa/sale/sale_jt_lr.cpt"
        case .dynamicInsuranceSales:
            return "oa/sale/sale_report_dongbao.cpt"
        case .batchSales, .premixSales, .concentratedMilk:
            return "oa/sale/slae_report.cpt"
        case .overdue:
            return "oa/fee/cwt_client_cqysk.cpt"
        }
    }

    var title: String {
        switch self {
        case .education:
            return "团队四化(学历)排行"
        case .age:
            return "团队四化(年龄)排行"
        case .groupProfits:
            return "集团利润排行"
        case .dynamicInsuranceSales:
            return "动保销售排行"
        case .premixSales:
            return "预混料体系销售排行榜"
        case .batchSales:
            return "配合料体系销售排行榜"
        case .concentratedMilk:
            return "浓乳料体系销售排行榜"
        case .overdue:
            return "超期欠款执行排行"
        }
    }

    var parameters: [String : Any]? {
        switch self {
        case .groupProfits(let month):
            return ["y_month": month]
        case .dynamicInsuranceSales(let orgCode, let month):
            return ["p_org_code": orgCode, "p_month": month]
        case .batchSales(let orgCode, let code, let month, let staff):
            return ["p_org_code": orgCode, "p_code": code, "p_month": month, "p_staff_id": staff]
        case .premixSales(let orgCode, let code, let month, let staff):
            return ["p_org_code": orgCode, "p_code": code, "p_month": month, "p_staff_id": staff]
        case .concentratedMilk(let orgCode, let code, let month, let staff):
            return ["p_org_code": orgCode, "p_code": code, "p_month": month, "p_staff_id": staff]
        case .overdue(let orgCode, let code, let month, let staff):
            return ["p_org_code": orgCode, "p_code": code, "p_month": month, "p_staff_id": staff]
        default:
            return nil
        }
    }
}
